-- GENERATED SPELL FOR [Moonrage Sentry] --


function spell0_1893(pUnit, Event) --@Battle Roar,Self--
pUnit:FullCastSpellOnTarget(6507,pUnit)
pUnit:RegisterEvent('Sorts_1893', 0, 1)
end

function spell1_1893(pUnit, Event) --@Defensive Stance,Self--
pUnit:FullCastSpellOnTarget(7164,pUnit)
pUnit:RegisterEvent('Sorts_1893', 535, 1)
end

function spell2_1893(pUnit, Event) --@Demoralizing Shout,Self--
pUnit:FullCastSpellOnTarget(13730,pUnit)
pUnit:RegisterEvent('Sorts_1893', 30277, 1)
end

function spell3_1893(pUnit, Event) --@Transformation,Self--
pUnit:FullCastSpellOnTarget(7671,pUnit)
pUnit:RegisterEvent('Sorts_1893', 649, 1)
end

function Sorts_1893(pUnit, Event)
local choix_sorts_1893 = math.random(0, 3)
if choix_sorts_1893 == 0 then
pUnit:RegisterEvent('spell0_1893', 1, 1)
end
if choix_sorts_1893 == 1 then
pUnit:RegisterEvent('spell1_1893', 1, 1)
end
if choix_sorts_1893 == 2 then
pUnit:RegisterEvent('spell2_1893', 1, 1)
end
if choix_sorts_1893 == 3 then
pUnit:RegisterEvent('spell3_1893', 1, 1)
end
end

function mob1893_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1893', math.random(1500, 3000), 1)
end

function mob1893_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1893_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1893_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1893, 1, 'mob1893_Action')
RegisterUnitEvent(1893, 2, 'mob1893_Leave')
RegisterUnitEvent(1893, 3, 'mob1893_Kill')
RegisterUnitEvent(1893, 4, 'mob1893_Die')
